package com.ihg.hiex.entity.session.during;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.user.Assessor;
import com.ihg.hiex.entity.user.Delegate;

/**
 * 
 * @author dan
 *
 */
@Entity
@Table(name ="session_exercise")
public class SessionExercise {
    
    @Id
    @GeneratedValue
    private Long id;
    
    /** 名称 与task名称一致 */
    private String name;
    
    /** exercise summary question */
    private String summaryQuestion;
    
    /** exercise summary option */
    private Boolean summaryOption;
    
    /** exercise summary comment */
    private String summary;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Assessor assessor;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Delegate delegate;
    
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Session session;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * The default constructor
     */
    public SessionExercise() {
        
    }
    
    /**
     * 
     * @param name
     * @param summaryQuestion
     * @param session
     * @param assessor
     * @param delegate
     */
    public SessionExercise(String name, String summaryQuestion, Session session, Assessor assessor, Delegate delegate) {
        this.name = name;
        this.summaryQuestion = summaryQuestion;
        this.assessor = assessor;
        this.delegate = delegate;
        this.session = session;
        this.disabled = false;
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @return the summaryQuestion
     */
    public String getSummaryQuestion() {
        return summaryQuestion;
    }

    /**
     * @return the summaryOption
     */
    public Boolean getSummaryOption() {
        return summaryOption;
    }

    /**
     * @return the summary
     */
    public String getSummary() {
        return summary;
    }

    /**
     * @return the assessor
     */
    public Assessor getAssessor() {
        return assessor;
    }

    /**
     * @return the delegate
     */
    public Delegate getDelegate() {
        return delegate;
    }

    /**
     * @return the session
     */
    public Session getSession() {
        return session;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @param summaryQuestion the summaryQuestion to set
     */
    public void setSummaryQuestion(String summaryQuestion) {
        this.summaryQuestion = summaryQuestion;
    }

    /**
     * @param summaryOption the summaryOption to set
     */
    public void setSummaryOption(Boolean summaryOption) {
        this.summaryOption = summaryOption;
    }

    /**
     * @param summary the summary to set
     */
    public void setSummary(String summary) {
        this.summary = summary;
    }

    /**
     * @param assessor the assessor to set
     */
    public void setAssessor(Assessor assessor) {
        this.assessor = assessor;
    }

    /**
     * @param delegate the delegate to set
     */
    public void setDelegate(Delegate delegate) {
        this.delegate = delegate;
    }

    /**
     * @param session the session to set
     */
    public void setSession(Session session) {
        this.session = session;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }
}
